package com.sky.business.sys.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.sky.common.enums.Arch;
import com.sky.common.enums.RestartPolicy;
import com.sky.common.enums.TaskType;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

/**
 * 容器配置
 */
@Data
@TableName(value = "d_container_config", autoResultMap = true)
public class ContainerConfig implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 版本
     */
    @TableField(value = "version")
    private Integer version;

    /**
     * 描述
     */
    @TableField(value = "description")
    private String description;

    /**
     * 镜像名称
     */
    @TableField(value = "image_name")
    private String imageName;

    /**
     * 镜像标签
     */
    @TableField(value = "image_tag")
    private String imageTag;

    /**
     * 平台  amd64、arm64
     */
    @TableField(value = "image_arch")
    private Arch imageArch;

    /**
     * 镜像大小,单位MB
     */
    @TableField(value = "image_size")
    private Integer imageSize;

    /**
     * 任务类型
     */
    @TableField(value = "task_type")
    private TaskType taskType;

    /**
     * 共享内存,单位MB
     */
    @TableField(value = "shared_memory")
    private Integer sharedMemory;

    /**
     * 最大物理内存,单位MB
     */
    @TableField(value = "memory")
    private Integer memory;

    /**
     * 交换内存,单位MB
     */
    @TableField(value = "swap_memory")
    private Integer swapMemory;

    /**
     * 内核内存,单位MB
     */
    @TableField(value = "kernel_memory")
    private Integer kernelMemory;

    /**
     * 是否使用主机网络模式
     */
    @TableField(value = "host_mode")
    private Boolean hostMode;

    /**
     * 重启策略
     */
    @TableField(value = "restart_policy")
    private RestartPolicy restartPolicy;

    /**
     * 运行时
     */
    @TableField(value = "runtime")
    private String runtime;

    /**
     * 是否需要gpu
     */
    @TableField(value = "gpu_support")
    private Boolean gpuSupport;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    /**
     * 是否删除
     */
    @TableField(value = "is_del")
    private Boolean isDel = false;


}